package temp;

import com.gitee.beiding.template_excel.Data;
import com.gitee.beiding.template_excel.Renderer;

import java.io.*;
import java.util.Arrays;

public class 导出测试 {
    public static void main(String[] args) throws IOException {
        InputStream stream = new FileInputStream("C:\\Users\\dinglei\\Desktop\\模板.xlsx");

        Data data = Data.create();
        data.put("year", "2020");

        File file = File.createTempFile("aaaa", ".xlsx");
        Renderer.render(data, stream, new FileOutputStream(file), "Sheet1");
        System.out.println(file.getAbsolutePath());

    }
}
